package com.easy.query.test.mysql8.vo;


import com.easy.query.test.mysql8.entity.bank.SysUser;
import lombok.Data;
import com.easy.query.core.annotation.Column;
import com.easy.query.core.annotation.Navigate;
import com.easy.query.core.enums.RelationTypeEnum;
import com.easy.query.core.annotation.OrderByProperty;

import java.time.LocalDateTime;

import com.easy.query.test.mysql8.view.FirstSysBankCard;

import java.util.List;

import lombok.Data;
import com.easy.query.core.annotation.ForeignKey;

import java.io.Serializable;

/**
 * this file automatically generated by easy-query struct dto mapping
 * 当前文件是easy-query自动生成的 结构化dto 映射
 * {@link com.easy.query.test.mysql8.entity.bank.SysBank }
 *
 * @author xuejiaming
 * @easy-query-dto schema: normal
 */
@Data
public class SysBankXDTO {


    private String id;
    /**
     * 银行名称
     */
    private String name;
    /**
     * 成立时间
     */
    private LocalDateTime createTime;
    /**
     * 拥有的银行卡
     */
    @Navigate(value = RelationTypeEnum.OneToMany, limit = 3)
    private List<InternalBankCards> bankCards;


    /**
     * {@link com.easy.query.test.mysql8.entity.bank.SysBankCard }
     */
    @Data
    public static class InternalBankCards {

        private String id;
        /**
         * 银行卡号
         */
        private String code;
        /**
         * 银行卡类型借记卡 储蓄卡
         */
        private String type;

        /**
         * 所属用户
         */
        @Navigate(value = RelationTypeEnum.ManyToOne)
        private InternalSysUser user;

    }

    /**
     * {@link SysUser}
     **/
    @Data
    public static class InternalSysUser {
        private String id;
        private String name;
        private String phone;
        private Integer age;
        private LocalDateTime createTime;
    }

}
